import { Space, Table} from 'antd';
import Handle from './Modal/Modal';

const columns = [
  {
    // 外键联表查询订单记录里面的服务类型
    title: '订单编号',
    dataIndex: 'orderNum',
    key: 'orderNum',
  },
  {
    title: '申请时间',
    dataIndex: 'ApplyTime',
    key: 'ApplyTime',
  },
  {
    // 用户ID
    title: 'ID',
    dataIndex: 'userId',
    key: 'userId',
  },
  {
    // 用户姓名
    title: '姓名',
    dataIndex: 'userName',
    key: 'userName',
  },
  {
    title: '退款金额',
    dataIndex: 'refundCount',
    key: 'refundCount',
  },
  {
    // 外键联表查询订单记录表里面的服务类型 
    title: '服务类型',
    dataIndex: 'serviceType',
    key: 'serviceType',
  },
  {
    title: '陪护员',
    dataIndex: 'careName',
    key: 'careName',
  },
  {
    title: '处理时间',
    dataIndex: 'resolveTime',
    key: 'resolveTime',
  },
  {
    //0待处理  1已同意  2已拒绝 
    title: '状态',
    dataIndex: 'refundState',
    key: 'refundState',
  },
  {
    title: '操作',
    dataIndex: 'operation',
    key: 'operation',
    render: (text,record) => (
      <Space size="middle">
        <Handle name={record}/>
      </Space>
    )
  }
]
const data = [
  {
    key: '1',
    orderNum: 'CJR2139987',
    ApplyTime: '2018-11-08 19:22:09',
    userId: 'CJR-001',
    userName: '张思',
    refundCount: '38',
    serviceType: '理发',
    careName: '李思',
    cancelReason:'服务不行',
    resolveTime: '2018-11-08 19:22:09',
    refundState: '待处理',
    orderState:''
  },
  {
    key: '2',
    orderNum: 'CJR123456',
    ApplyTime: '2018-11-08 19:22:09',
    userId: 'CJR-001',
    userName: '王大爷',
    refundCount: '38',
    serviceType: '理发',
    careName: '李师师',
    resolveTime: '2018-11-08 19:22:09',
    refundState: '待处理',
    orderState:'',
    cancelReason:'点错了'
  },
];


function RefundTab() {
  return<div>
      <Table columns={columns} dataSource={data}/>  
    </div>
}
export default RefundTab;
